/*
 * @Author: adolphus adolphus520@163.com
 * @Date: 2022-12-11 22:29:08
 * @LastEditors: 姚杰鸿
 * @LastEditTime: 2025-01-23 15:49:53
 * @Description: file content
 */
import req from "@/lib/axios";

export const MenuApi = (info: string, attr: boolean, tree: boolean) =>
  req({
    url: `/menu${info}`,
    method: "get",
    headers: {
      "q-attr-info": attr ? "1" : "",
      "q-tree-info": tree ? "1" : "",
    },
  });

export const MenuPostApi = (menu: any) =>
  req({ url: "/menu", method: "post", data: menu });

export const MenuDeleteApi = (menu: any) =>
  req({ url: `/menu/${menu.code}`, method: "delete" });
